#pragma once

#include <AVUIGeneralTransform3D.h>

// REVIEW ALL Animatable/Freezables!
namespace AVUI {

class GeneralTransform3DTo2D;
class GeneralTransform2DTo3D;

class GeneralTransform3DTo2DTo3D : public GeneralTransform3D
{
public:
    DECLARE_ELEMENT(GeneralTransform3DTo2DTo3D, GeneralTransform3D);

    GeneralTransform3DTo2DTo3D(GeneralTransform3DTo2D* pTransform3DTo2D, GeneralTransform2DTo3D* pTransform2DTo3D);
    GeneralTransform3DTo2DTo3D() { }
 
    virtual Rect3D TransformBounds(const Rect3D& rect) AVUI_OVERRIDE;
    virtual bool TryTransform(const Point3D& inPoint, Point3D* pResult) AVUI_OVERRIDE;

    virtual TRefCountedPtr<Transform3D> get_AffineTransform() AVUI_OVERRIDE { return NULL; }
    virtual TRefCountedPtr<GeneralTransform3D> get_Inverse() { return NULL; }

protected:

    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<GeneralTransform3DTo2DTo3D>().get_Ptr(); }

private:

    TRefCountedPtr<GeneralTransform2DTo3D> m_pTransform2DTo3D;
    TRefCountedPtr<GeneralTransform3DTo2D> m_pTransform3DTo2D;

};


}; // namespace AVUI
